<template>
  <!--外部链接-->
  <div class="col-md-12 col-link" id="col-link-qy">
    <div class="task-row flip-container" id="quickUrlContainer">
      <div class="link-module flipper col-md-6">
        <div class="module baidu">
          <section id="baidu" class="module-header">
            <h1>百度</h1>
          </section>
          <span class="info-box-text">
            <a target="_blank" href="http://www.baidu.com/">
              <img src="/static/resources/img/baidu.png">
            </a>
          </span>
        </div>
      </div>
      <div class="link-module flipper col-md-6">
        <div class="module kuaidi100">
          <section id="kaudi100" class="module-header">
            <h1>快递一百</h1>
          </section>
          <span class="info-box-text">
            <a target="_blank" href="http://www.kuaidi100.com/">
              <img src="/static/resources/img/kuaidi100.png">
            </a>
          </span>
        </div>
      </div>
      <quickUrlHtml
        v-if="quickUrlHtmlData !== ''"
        v-for="(item,k) in quickUrlHtmlData"
        :key="k"
        :quickUrl="item"
        @changeQuikUrl="changeQuikUrl"
      >

      </quickUrlHtml>
    </div>
  </div>
</template>

<script>
  import {mapState,mapActions} from 'vuex'
  import store from '../../store/store'
  import quickUrlHtml from './quikUrlContainer/quickUrlHtml'
  import {reWidth} from '../../utils/utils'
    export default {
      name: "quickUrl-Container",
      store,
      data(){
        return {
          quickUrlHtmlDataT:['','']
        }
      },
      methods:{
        changeQuikUrl(data){
          for(let i = 0;i<data.length;++i){
            this.quickUrlHtmlDataT[i] = data[i];
          }
        }
      },
      mounted(){
        reWidth();
      },
      computed:{
        ...mapState('addlinkStore',['newLink']),
        quickUrlHtmlData(){
          return this.newLink;
        }
      },
      components:{
        quickUrlHtml:quickUrlHtml
      }
    }
</script>

<style scoped>

</style>
